const mixin = require("../../mixins");
Component({
  behaviors: [mixin],
  data: {
    animation: null,
    visible: !0
  },
  properties: {
    mf_data: Object,
    mf_class: String,
    mf_style: String
  },
  attached() {
    const e = wx.createIntersectionObserver(this);
    e.relativeToViewport().observe(".animation-container", e => {
      e.intersectionRatio > 0 ? this.setData({
        visible: !0
      }) : this.setData({
        visible: !1
      })
    })
  },

  detached() {},
  methods: {
    onAppear() {
      this.setData({
        visible: !0
      })
    },
    onDisappear() {
      this.setData({
        visible: !1
      })
    },
    onTapEvent(){
    }
  }
});
